using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Rally_Dekstop
{
    public partial class GUIPrintPreview : Form
    {
        private string htmlPath = string.Empty;
        private string defectID = string.Empty;

        public GUIPrintPreview()
        {
            InitializeComponent();
        }

        public string HTMLPath
        {
            set
            {
                htmlPath = value;
            }
        }

        public string DefectID
        {
            set
            {
                defectID = value;
            }
        }

        public void ShowPreview()
        {
            this.Text = defectID;
            webBrowserPrint.Navigate(htmlPath);
        }

        private void btnPrint_Click(object sender, EventArgs e)
        {
            Cursor currentCursor = this.Cursor;
            this.Cursor = Cursors.WaitCursor;
            webBrowserPrint.Print();
            this.Cursor = currentCursor;
        }

    }
}